#include <stdio.h>
#include <windows.h>

int main()
{
    SetConsoleOutputCP(65001);
    char buff[255];
    FILE *fp = NULL;
    fp = fopen("./test.txt", "a");
    fprintf(fp, "This is testing for fprintf...\n");
    fputs("This is testing for fputs...\n", fp);
    fclose(fp);
    fp = fopen("./test.txt", "r");
    fscanf(fp, "%s", buff);
    printf("1: %s\n", buff);
    fgets(buff, 255, (FILE *)fp);
    printf("2: %s\n", buff);
    fgets(buff, 255, (FILE *)fp);
    printf("3: %s\n", buff);
    fclose(fp);
}
